package controller;

import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Listener;

import controller.listeners.mainWindow.CancelListener;
import controller.listeners.mainWindow.ClearMessageListener;
import controller.listeners.mainWindow.MessageDblClickSelectionListener;
import controller.listeners.mainWindow.MessageKeyDownListener;

import model.MainWindowModel;
import view.MainWindowView;

public class MainWindowController {

	private MainWindowView _view;
	private MainWindowModel _model;
	
	public MainWindowController(MainWindowView view){
		_view = view;
		_model = new MainWindowModel();

	}
	
	public SelectionListener getCancelListener() {
		return new CancelListener(_view, _model);
	}

	public SelectionListener getClearMessageListener() {
		return new ClearMessageListener(_view, _model);
	}
	

	/**
	 * @return controlador para abrir la consola de mensajes grande
	 */
	public Listener getMessageDblClickSelectionListener() {
		return new MessageDblClickSelectionListener(_view, _model);
	}

	public Listener getMessageKeyDownListener() {
		return new MessageKeyDownListener(_view, _model);
	}
}
